<template>
  <van-list
    v-model="val"
    :finished="finished"
    finished-text="没有更多了"
    @load="$emit('next')"
    offset="30"
  >
    <slot />
  </van-list>
</template>
<script>
export default {
  props: {
    value: {
      type: Boolean,
      default: false
    },
    finished: {
      type: Boolean,
      default: true
    }
  },
  computed: {
    val: {
      get() {
        return this.value;
      },
      set(v) {
        this.$emit("input", v);
      }
    }
  }
};
</script>
